-- GENERATED SPELL FOR [Yeh'kinya] --


function spell0_8579(pUnit, Event) --6Create Yeh\'kinya\'s Scroll,n/a--
pUnit:FullCastSpellOnTarget(12998,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8579', 624, 1)
end

function spell1_8579(pUnit, Event) --@Create Zul\'s Aura,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(24186,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_8579', 1, 1)
end

function spell2_8579(pUnit, Event) --@Quest - Polymorph Impact,n/a--
pUnit:FullCastSpellOnTarget(24180,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8579', 552, 1)
end

function Sorts_8579(pUnit, Event)
local choix_sorts_8579 = math.random(0, 2)
if choix_sorts_8579 == 0 then
pUnit:RegisterEvent('spell0_8579', 1, 1)
end
if choix_sorts_8579 == 1 then
pUnit:RegisterEvent('spell1_8579', 1, 1)
end
if choix_sorts_8579 == 2 then
pUnit:RegisterEvent('spell2_8579', 1, 1)
end
end

function mob8579_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8579', math.random(1500, 3000), 1)
end

function mob8579_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8579_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8579_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8579, 1, 'mob8579_Action')
RegisterUnitEvent(8579, 2, 'mob8579_Leave')
RegisterUnitEvent(8579, 3, 'mob8579_Kill')
RegisterUnitEvent(8579, 4, 'mob8579_Die')
